﻿<Window 
    x:Class="Dispatcher.Views.MainWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    xmlns:ad="clr-namespace:AvalonDock;assembly=AvalonDock"
    Title="Dispatcher" Height="480" Width="800" 
    WindowStartupLocation="CenterScreen" 
    ResizeMode="CanResizeWithGrip"
    Loaded="Window_Loaded">
    
    <Window.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="/PresentationFramework.Aero;component/themes/Aero.NormalColor.xaml" />
            </ResourceDictionary.MergedDictionaries>
            <Style TargetType="{x:Type Image}">
                <Style.Triggers>
                    <DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType={x:Type MenuItem}, AncestorLevel=1}, Path=IsEnabled}" Value="False">
                        <Setter Property="Opacity" Value="0.30" />
                    </DataTrigger>
                </Style.Triggers>
            </Style>
        </ResourceDictionary>
    </Window.Resources>

    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>
        <Menu Height="21">
            <MenuItem Header="File">
                <MenuItem Header="{Localizing Save}" Command="ApplicationCommands.Save" Icon="{Picture Icons/Save_16x16.png, 16}"/>
                <MenuItem Header="Undo" Command="Undo"/>
                <Separator/>
                <MenuItem Header="Close" Command="Close"/>
            </MenuItem>
            <MenuItem Header="{Localizing Edit}">
                <MenuItem Header="{Localizing Undo}" Command="ApplicationCommands.Undo" Icon="{Picture Icons/Undo_16x16.png, 16}"/>
                <MenuItem Header="{Localizing Redo}" Command="ApplicationCommands.Redo" Icon="{Picture Icons/Redo_16x16.png, 16}"/>
                <Separator/>
                <MenuItem Header="{Localizing Cut}" Command="ApplicationCommands.Cut" Icon="{Picture Icons/Cut_16x16.png, 16}"/>
                <MenuItem Header="{Localizing Copy}" Command="ApplicationCommands.Copy" Icon="{Picture Icons/Copy_16x16.png, 16}"/>
                <MenuItem Header="{Localizing Paste}" Command="ApplicationCommands.Paste" Icon="{Picture Icons/Paste_16x16.png, 16}"/>
                <MenuItem Header="{Localizing Delete}" Command="ApplicationCommands.Delete" Icon="{Picture Icons/Delete_16x16.png, 16}"/>
                <Separator/>
                <MenuItem Header="{Localizing SelectAll}" Command="ApplicationCommands.SelectAll"/>
            </MenuItem>
            <MenuItem Header="_Database" ItemsSource="{Binding ObjectSetMenuItems}"/>
        </Menu>
        <ToolBarTray Grid.Row="1" Name="ToolBarTray">

        </ToolBarTray>
        <ad:DockingManager Grid.Row="2" DocumentsSource="{Binding Documents}" Name="DockManager">
            <ad:ResizingPanel>
                <ad:DockablePane ad:ResizingPanel.ResizeWidth="200" >
                </ad:DockablePane>
                <ad:DocumentPane Name="DocPane"/>
            </ad:ResizingPanel>
        </ad:DockingManager>
        <StatusBar Grid.Row="3" Name="StatusBar" Height="21">
            <StatusBarItem Name="Status" Content="{Binding Status}" HorizontalContentAlignment="Right" HorizontalAlignment="Right"/>
        </StatusBar>
    </Grid>
</Window>
